package com.guigu.basedservice.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.guigu.basedservice.dto.BaseCarPartsSkuDto;
import com.guigu.basedservice.dto.CarSeriesInfoDto;
import com.guigu.basedservice.entity.BaseCarFactory;
import com.guigu.basedservice.entity.BaseCarPartsSku;
import com.guigu.basedservice.mapper.BaseCarPartsSkuDtoMapper;
import com.guigu.basedservice.mapper.CarSeriesInfoDtoMapper;
import com.guigu.basedservice.service.BaseCarPartsSkuDtoService;
import com.guigu.basedservice.service.CarSeriesInfoService;
import com.guigu.basedservice.vo.BaseCarFactoryVo;
import com.guigu.basedservice.vo.BasePartsTypeVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author heyuhang
 * @create 2024/9/19
 */
@Service
public class BaseCarPartsSkuDtoServiceImpl implements BaseCarPartsSkuDtoService {

    @Autowired(required = false)
    private BaseCarPartsSkuDtoMapper baseCarPartsSkuDtoMapper;

    @Override
    public PageInfo<BaseCarPartsSkuDto> getBaseCarPartsSkuDto(Integer currentPage, Integer pageSize) {

        PageHelper.startPage(currentPage,pageSize);
        List<BaseCarPartsSkuDto> carSeriesInfo = baseCarPartsSkuDtoMapper.getBaseCarPartsSkuDto();
        PageInfo<BaseCarPartsSkuDto> pageInfo=new PageInfo<>(carSeriesInfo);
        return pageInfo;
    }

    @Override
    public PageInfo<BaseCarPartsSkuDto> getBaseCarPartsSkuDto2(Integer currentPage, Integer pageSize, BasePartsTypeVo vo) {
        PageHelper.startPage(currentPage,pageSize);
        List<BaseCarPartsSkuDto> carSeriesInfo = baseCarPartsSkuDtoMapper.getBaseCarPartsSkuDto2(vo);
        PageInfo<BaseCarPartsSkuDto> pageInfo=new PageInfo<>(carSeriesInfo);
        return pageInfo;
    }


}
